package com.xjoyt.pay.share.repository;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import com.xjoyt.pay.repository.Repository;
import com.xjoyt.pay.share.dao.BucketRepositoryCustom;
import com.xjoyt.pay.share.po.Bucket;

public interface BucketRepository extends Repository<Bucket>, BucketRepositoryCustom {

	Page<Bucket> findAllByEndpointAndAccessKeyAndSecretKeyAndName(String endpoint, String accessKey, String secretKey,
			String name, Pageable pageble);

	Page<Bucket> findAllByIdNotAndEndpointAndAccessKeyAndSecretKeyAndName(String id, String endpoint, String accessKey,
			String secretKey, String name, Pageable pageble);

	Page<Bucket> findAllByEnabledTrueAndDefaultBucketTrue(Pageable pageable);
}
